#include "log.h"
#include <iostream>
#include <thread>
#include <vector>
#include <chrono>

using namespace std;

void performlogtest()
{
    for (int i = 0; i < 10; ++i)
    {
        LOG_DEBUG("Thread ID: %d- Iteration:%d", this_thread::get_id(), i);
    }
}

int main()
{
    Log::GetInstance()->init("./logs/", "_test.log", 0 ,100);

    const int numThreads = 10;
    std::vector<std::thread> threads;
    for (int i = 0; i < numThreads; ++i)
    {
        threads.emplace_back(performlogtest);
    }

    for (auto &thread : threads)
    {
        thread.join();
    }
    return 0;
}